package com.xm9m.ibczy.dsp.http;


import com.xm9m.ibczy.dsp.http.bhttp.RequestQueue;
import com.xm9m.ibczy.dsp.http.bhttp.http.BCGetRequest;
import com.xm9m.ibczy.dsp.http.bhttp.http.BCHttpListener;

import org.junit.Test;

/**
 * Created by baichuan on 2016/11/24.
 */

public class Ant1 {
    public static final String urlStr = "https://www.baidu.com/";
    public static final String urlImg = "https://www.baidu.com/img/bd_logo1.png";
    public static final String urlImg1 = "http://cdn.dsp.ibczy.com/adImages/7/f9yrKZ8lozVzVKvj3D0VRhgCeMI5t3.jpg";

    private static RequestQueue pool = new RequestQueue.RequestQueueBuilder().builder();


    @Test
    public void main() {
        BCGetRequest antGetRequest = new BCGetRequest(urlStr).withListener(new BCHttpListener() {
            @Override
            public void onSuccess(int statueCode, byte[] data) {
                System.out.println("code=" + statueCode + "data=" + new String(data));
            }

            @Override
            public void onError(int statueCode, String message) {
                System.out.println("code=" + statueCode + "data=" + message);
            }
        });
        pool.add(antGetRequest);
    }

    @Test
    public void ant() {
        System.out.println("ant 123");
    }

}


